package com.aclever.sys.modules;

import javax.swing.*;
import javax.swing.table.TableCellEditor;
import java.awt.*;

/**
 * Created with IntelliJ IDEA.
 * User: aclever
 * Date: 27.07.13
 * Time: 19:19
 * To change this template use File | Settings | File Templates.
 */
public class ButtonEditor extends AbstractCellEditor implements TableCellEditor {

    private JButton jButton;

    public ButtonEditor() {
    }

    public Component getTableCellEditorComponent(JTable table, Object value,
             boolean isSelected, int row, int column) {
        jButton = (JButton) value;
        return (JButton) value;
    }

    public Object getCellEditorValue() {
        return jButton;
    }
}